package io;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "张大大";
        int age=23;
        String gender = "男";
        String[] otherInfo={"是一名学生","四川广安的","喜欢游泳"};
        Student zdd = new Student(name, age, gender, otherInfo);
        System.out.println(zdd);
        FileOutputStream fos = new FileOutputStream("stu.txt");
        ObjectOutputStream ops=new ObjectOutputStream(fos);
        ops.writeObject(zdd);
        System.out.println("写出完毕");
        ops.close();

    }
}
